How can I cast string to enum

246

How can I cast string to enum? -

YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);

Comments

Submit
0 Comments